package com.example.project_springboot.mapper;

import com.example.project_springboot.pojo.Emp;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.util.List;

/**
 * 员工管理
 */
@Mapper
public interface EmpMapper {
    void deleteEmp(Long[] ids);

    List<Emp> selectEmp(String name, Short gender, LocalDate begin, LocalDate end);
    /**
     * 根据ID查询员工
     * @param id
     * @return
     */
    @Select("select * from emp where  id = #{id}")
    Emp getById(Integer id);

    /**
     * 更新员工
     * @param emp
     */
    void update(Emp emp);

    Emp psdAndusername(Emp emp);
}
